package cn.anlaser.admin;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.apache.shiro.authz.SimpleAuthorizationInfo;

import cn.anlaser.status.FlagEnum;


@Data
@EqualsAndHashCode(exclude = { "password", "salt"}, callSuper = false)
@ToString(exclude = { "password", "salt"})
public class BaseUser implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4822559006968963997L;
	private Long id;
	private FlagEnum flag;
	private Date createdDate;
	private Long createdBy;
	private String username;

	private String salt;
	private String password;// 密码
	private Boolean locked = Boolean.FALSE;

	private Date lastLoginTime;
	private boolean onlineFlag;
	private String role;
	private Long siteId;
	public String getCredentialsSalt() {
		return username + salt;
	}
	SimpleAuthorizationInfo info;
}